package com.linfeng.business.admin.aggregate;

import com.linfeng.business.admin.aggregate.callback.AdminAggregateRootCallback;
import com.linfeng.business.admin.dto.data.admin.SysAdminDTO;
import com.linfeng.component.common.response.ResponseEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "business-admin", contextId = "system-admin-aggregate-root", path = "/domain/admin", fallback = AdminAggregateRootCallback.class)
public interface AdminAggregateRoot {

    @GetMapping(value = "/v1/loginName/{loginName}")
    ResponseEntity<SysAdminDTO> detailByLoginName(@PathVariable(value = "loginName") String loginName);
}
